<style>
.form-horizontal .form-group {
    margin-right: 0.5rem;
    margin-left: 0.5rem;
}
</style>
<div class='fui-page fui-page-current order-detail-page'>
    <div class="fui-header">
        <div class="fui-header-left">
            <a class="back btn-back" ng-click="goback();"></a>
        </div>
        <div class="title">申请结算</div>
        <div class="fui-header-right"></div>
    </div>
	<div ng-if="pagedata.op=='step1' || pagedata.op=='edit'" class='fui-content form-horizontal' style="margin-top:2.5rem">
	  <div class="modal-panel" style="margin: 0.5rem;background-color:#fff;padding-bottom:0.5rem">
		<div class='fui-cell-group' style="margin:0">
			<div class="tips tips-yellow">
				<i class="fa fa-bullhorn"></i> [<red>温馨提示</red>]：每次最大提现1000个订单；如订单过多，需要分批结算；
			</div>
			<div class="tips tips-yellow">
				<i class="fa fa-bullhorn"></i> [<red>温馨提示</red>]：{{pagedata.tixian_timetips}}；
			</div>
			<div ng-if="pagedata.item.year2>0" class="fui-cell">
						<div class="fui-cell-label" style="width: 120px;"><span class="re-g">结算年份</span></div>
						<div class="fui-cell-info">
						{{pagedata.item.year2}}
						</div>
			</div>
			<div ng-if="pagedata.item.month2 && pagedata.item.year2" class="fui-cell">
						<div class="fui-cell-label" style="width: 120px;"><span class="re-g">结算月份</span></div>
						<div class="fui-cell-info">
						{{pagedata.item.month2}}
						</div>
			</div>
			<div class="fui-cell">
						<div class="fui-cell-label" style="width: 120px;"><span class="re-g">提现方式</span></div>
						<div class="fui-cell-info">
							<select id="applytype" ng-model="pagedata.item.pay_type">
								<option ng-repeat="(k,title) in pagedata.pay_types" value="{{k}}" ng-selected="pagedata.item.pay_type==k">{{title}}</option>
							</select>
						</div>
						<div class="fui-cell-remark"></div>
					</div>
					<div class="fui-cell ab-group">
						<div class="fui-cell-label" style="width: 120px;">真实姓名</div>
						<div class="fui-cell-info"><input type="text" id="realname" name="realname" ng-model="pagedata.item.realname" class='fui-input' value="{{pagedata.item.realname}}" max="25"/></div>
					</div>
					<div ng-if="pagedata.item.pay_type =='alipay'" class="fui-cell alipay-group">
						<div class="fui-cell-label" style="width: 120px;">支付宝帐号</div>
						<div class="fui-cell-info">
						<input type="text" id="alipay" name="alipay" class='fui-input' ng-model="pagedata.item.alipay" value="{{pagedata.item.alipay}}" max="25"/>
						</div>
					</div>
					<div ng-if="pagedata.item.pay_type =='alipay'" class="fui-cell alipay-group">
							<div class="fui-cell-label" style="width: 120px;">确认帐号</div>
							<div class="fui-cell-info"><input type="text" id="alipay1" ng-model="pagedata.item.alipay1" name="alipay1" class='fui-input' value="{{pagedata.item.alipay1}}" max="25"/></div>
					</div>
					<div ng-if="pagedata.item.pay_type =='union'" class="fui-cell bank-group" >
							<div class="fui-cell-label" style="width: 120px;">所属银行</div>
							<div class="fui-cell-info">
								<input type="text" name="bankname" class='fui-input' ng-model="pagedata.item.bankname" value="{{pagedata.item.bankname}}"/>
							</div>
					</div>
					<div ng-if="pagedata.item.pay_type =='union'" class="fui-cell bank-group">
							<div class="fui-cell-label" style="width: 120px;">银行卡号</div>
							<div class="fui-cell-info"><input type="text" id="bankcard" name="bankcard" class='fui-input' ng-model="pagedata.item.bankcard" value="{{pagedata.item.bankcard}}" max="25"/></div>
					</div>
					<div ng-if="pagedata.item.pay_type =='union'" class="fui-cell bank-group">
							<div class="fui-cell-label" style="width: 120px;">确认卡号</div>
							<div class="fui-cell-info"><input type="text" id="bankcard1" name="bankcard1" class='fui-input' ng-model="pagedata.item.bankcard1" value="{{pagedata.item.bankcard1}}" max="25"/></div>
					</div>
		</div>
		<div ng-if="pagedata.item.isonejifen!=1" class="form-group">
		  <label class="col-xs-2 col-sm-3 col-md-2 right-label" >单量</label>
		  <div class="col-xs-10 col-sm-8 col-lg-9">
			<div class="input-group">
			  <input class="form-control " style="margin:0"   ng-model="pagedata.item.salsecount" ng-readonly="true" type="text" readonly="readonly">
			  <span class="input-group-addon">个</span></div>
			<div class="help-block" style="display:none;color:red;">请输入商品销量</div>
			<div class="help-block"></div>
		  </div>
		</div>
		<div ng-if="pagedata.item.isonejifen!=1" class="form-group">
		  <label class="col-xs-2 col-sm-3 col-md-2 right-label">单额</label>
		  <div class="col-xs-10 col-sm-8 col-lg-9">
			<div class="input-group">
			  <input class="form-control " style="margin:0"   ng-model="pagedata.item.ordermoney" ng-readonly="true" type="text" readonly="readonly">
			  <span class="input-group-addon">元</span></div>
			<div class="help-block" style="display:none;color:red;">请输入订单金额</div>
			<div class="help-block"></div>
		  </div>
		</div>
		<div ng-if="pagedata.item.isonejifen!=1" class="form-group">
		  <label class="col-xs-2 col-sm-3 col-md-2 right-label">提现金额</label>
		  <div class="col-xs-10 col-sm-8 col-lg-9">
			<div class="input-group">
			  <input class="form-control ng-pristine ng-untouched ng-valid ng-not-empty" style="margin:0"   ng-model="pagedata.item.price" ng-readonly="true" type="text" readonly="readonly">
			  <span class="input-group-addon">元</span></div>
		  </div>
		</div>
		<div class="form-group">
		  <label class="col-xs-2 col-sm-3 col-md-2 right-label">结积分</label>
		  <div class="col-xs-10 col-sm-8 col-lg-9">
			<div class="input-group">
			  <input class="form-control" style="margin:0" ng-model="pagedata.item.fdelcredit1" ng-readonly="true" type="text" readonly="readonly">
			  <span class="input-group-addon">个</span></div>
			<div class="help-block" style="color:red;">客户用积分支付，结算到商户钱包</div>
		  </div>
		</div>
		<div ng-if="pagedata.item.isonejifen!=1" class="form-group">
		  <label class="col-xs-2 col-sm-3 col-md-2 right-label" >扣运费</label>
		  <div class="col-xs-10 col-sm-8 col-lg-9">
			<div class="input-group">
			  <input class="form-control " style="margin:0" ng-model="pagedata.item.peifee" ng-readonly="true" type="text" readonly="readonly">
			  <span class="input-group-addon">元</span></div>
			  <div class="help-block">真实平台规则配送费（并非客户下单配送费）</div></div>
		  </div>
		</div>
		<div ng-if="pagedata.item.isonejifen!=1" class="form-group">
		  <label class="col-xs-2 col-sm-3 col-md-2 right-label" >提现费率</label>
		  <div class="col-xs-10 col-sm-8 col-lg-9">
			<div class="input-group">
			  <input class="form-control ng-pristine ng-untouched ng-valid ng-not-empty" style="margin:0"   ng-model="pagedata.item.feerate" ng-readonly="true" type="text" readonly="readonly">
			  <span class="input-group-addon">点</span></div>
			<div class="help-block" style="display:none;color:red;">请输入提现费率</div>
			<div class="help-block">手续费百分比</div></div>
		</div>
		<div ng-if="pagedata.item.isonejifen!=1" class="form-group">
		  <label class="col-xs-2 col-sm-3 col-md-2 right-label" >提现手续费</label>
		  <div class="col-xs-10 col-sm-8 col-lg-9">
			<div class="input-group">
			  <input class="form-control ng-pristine ng-untouched ng-valid ng-not-empty" style="margin:0"   ng-model="pagedata.item.ratefee" ng-readonly="true" type="text" readonly="readonly">
			  <span class="input-group-addon">元</span></div>
			<div class="help-block" style="display:none;color:red;">请输入提现手续费</div>
			<div class="help-block"></div>
		  </div>
		</div>
		<div ng-if="pagedata.item.isonejifen!=1 && pagedata.item.educt_commission==1" class="form-group">
		  <label class="col-xs-2 col-sm-3 col-md-2 right-label" >扣除佣金</label>
		  <div class="col-xs-10 col-sm-8 col-lg-9">
			<div class="input-group">
			  <input class="form-control ng-pristine ng-untouched ng-valid ng-not-empty" style="margin:0"   ng-model="pagedata.item.commission_money" ng-readonly="true" type="text" readonly="readonly">
			  <span class="input-group-addon">元</span></div>
			<div class="help-block" style="display:none;color:red;">请输入扣除佣金</div>
			<div class="help-block">设置里面开启了扣除佣金，这次才会显示！【注意】：
			  只有存在上级或开启分销内购的订单，并产生佣金时，才有效！</div></div>
		</div>
		<div ng-if="pagedata.item.fanli_fee>0" class="form-group">
		  <label class="col-xs-2 col-sm-3 col-md-2 right-label" >商户返利</label>
		  <div class="col-xs-10 col-sm-8 col-lg-9">
			<div class="input-group">
			  <input class="form-control ng-pristine ng-untouched ng-valid ng-not-empty" style="margin:0"   ng-model="pagedata.item.fanli_fee" ng-readonly="true" type="text" readonly="readonly">
			  <span class="input-group-addon">元</span></div>
			</div>
		</div>
		<div ng-if="pagedata.item.isonejifen!=1" class="form-group">
		  <label class="col-xs-2 col-sm-3 col-md-2 right-label" >平台抽成</label>
		  <div class="col-xs-10 col-sm-8 col-lg-9">
			<div class="input-group">
			  <input class="form-control ng-pristine ng-untouched ng-valid ng-not-empty" style="margin:0"   ng-model="pagedata.item.sys_choufee" ng-readonly="true" type="text" readonly="readonly">
			  <span class="input-group-addon">元</span></div>
			<div class="help-block" style="display:none;color:red;">请输入平台抽成</div>
			<div class="help-block">不同类型商户抽成比例不一样！</div></div>
		</div>
		<div ng-if="pagedata.item.isonejifen!=1" class="form-group">
		  <label class="col-xs-2 col-sm-3 col-md-2 right-label" >到账金额</label>
		  <div class="col-xs-10 col-sm-8 col-lg-9">
			<div class="input-group">
			  <input class="form-control ng-pristine ng-untouched ng-valid ng-not-empty" style="margin:0" ng-model="pagedata.item.finalprice" ng-readonly="true" type="text" readonly="readonly">
			  <span class="input-group-addon">元</span></div>
			<div class="help-block"></div>
		  </div>
		</div>
		<div ng-if="pagedata.item.isonejifen!=1" class="form-group">
		  <label class="col-xs-2 col-sm-3 col-md-2 right-label" >赠送积分</label>
		  <div class="col-xs-10 col-sm-8 col-lg-9">
			<div class="input-group">
			  <input class="form-control ng-pristine ng-untouched ng-valid ng-not-empty" style="margin:0" ng-model="pagedata.item.jifen" ng-readonly="true" type="text" readonly="readonly">
			  <span class="input-group-addon">个</span></div>
			<div class="help-block"></div>
		  </div>
		</div>
		<div class="form-group">
		  <label class="col-xs-2 col-sm-3 col-md-2 right-label" >申请事由</label>
		  <div class="col-xs-10 col-sm-8 col-lg-9">
			<textarea style="height: 200px; border-color: rgb(221, 221, 221);" class="form-control" ng-class="{'must_set':false}" onblur="if($(this).hasClass('must') &amp;&amp; $(this).val()==''){$(this).next().show();$(this).css('border-color','red')}else{$(this).next().hide();$(this).css('border-color','#ddd')}" ng-model="pagedata.item.content" cols="50"></textarea>
		  </div>
		</div>
	  </div>
	  <div class="fui-navbar">
		<div ng-if="pagedata.item.finalprice>0 || pagedata.item.fdelcredit1>0" ng-click="check_form();post(pagedata.item,'step2')" class="nav-item btn btn-info">提交结算</div>
		<div ng-if="pagedata.item.finalprice<=0 && pagedata.item.fdelcredit1<=0" class="nav-item btn btn-gray">不能结算</div>
	   </div>
	</div>
</div>
